Ext.define('CAFE.view.Main' ,{
	extend: 'Ext.panel.Panel',
    alias: 'widget.main',
    id	 : 'CafeDashboard',
    border: false,
    layout : 'border',
	bodyBorder: false,
	//bodyStyle: 'background-color:white',
    items : [{
    	xtype : 'panel',
      	region:'north',
      	height:80,
         layout : {
             type : 'table',
             columns : 3
         },
      	collapsible : false,
      	border  : false,
      	bodyStyle: "background-image:url(./images/blue-header.png)",
      	items : [{
          	xtype:'image',
            id: 'nim-logo',
            margin:'15 0 0 25',
            src: './images/cafe-logo.png',
      	}/*,{
          	xtype:'image',
            id: 'telkomsel-logo',
            margin:'15 0 0 25',
            src: './images/tsel-logo.png',		
      	},{          		
      		
      	}*/]
    }, {
    	xtype : 'panel',
        region: 'west',
        collapsible: true,
        title: 'List Menu',
        margin : '4 4 4 4', // top right bot left
		width: 230,
        //bodyStyle: 'background-color:black'
        layout: 'accordion',
        items: [{
			xtype: 'menu',
			floating: false,
			title   : 'HOME',
			width: 230,
			items:[{
			    xtype: 'menuitem',
			    text: 'Home',
			    height : 30,
			    listeners: {
	            	   click: function(){
	            		   OpenTab('widget.mainhome','mainhome');
							}
	            
		    			},
			},
		    {
		        xtype: 'menuitem',
		        text: 'My Profile',
		        height : 30,
		    }, 
		    {
		        xtype: 'menuitem',
		        text: 'Change Password',
		        height : 30,
		    },
		    {
		        xtype: 'menuitem',
		        text: 'Logout',
		        height : 30,
		        /*listeners: {
	            	   click: function(){
	            		   location.href='./Services/Security/User/Logout';
							}
	            
		    			},*/
		    }]
        },{
			 xtype: 'menu',
			 floating: false,
			 title: 'DASHBOARD',
			 width: 230,
			 items: [{
				xtype: 'menuitem',
                text: 'MAIN DASHBOARD',
                height : 30,
                border : false,
	            listeners: {
	            	   click: function(){
	            		   OpenTab('widget.dashboard','dashboard');
							}
	            
		    			},
			 }]
        }],
    }, {
        region: 'center',
        xtype: 'tabpanel', // TabPanel itself has no title
    	//title : 'MAIN CONTENT',
    	id    : 'maincontent',
    	collapsible : false,
        margin : '4 0 4 0',
        // First tab active by default
        items: {
        	xtype :'dashboard'//'mainhome',
        }
    }, {
        region: 'south',
        title: 'South Panel',
        collapsible: true,
        collapsed: true,
        margin : '0 4 4 4',
        html: 'Information goes here',
        height: 100,
        minHeight: 100
    }, {
        region: 'east',
        title: 'East Panel',
        collapsible: true,
        collapsed: true,
        margin : '4 4 4 4',
        width: 150
    }]
         
});